use generator_engine::tera::TeraEngine;
use model_graph_types::{
    generator::{CodeGenerator, CodeGeneratorOption, CodeLanguage},
    modeling::Value,
};

#[tokio::main]
async fn main() {
    tracing_subscriber::fmt()
        .with_max_level(tracing::Level::DEBUG)
        .init();
    tracing::info!("RRAI 启动...");

    let engine = TeraEngine {};

    let arguments = Value::try_from(serde_json::json!({
        "N1735794080847":{
            "test": "111111"
        }
    }))
    .unwrap();

    let prompt_str = engine
        .simple(
            arguments.clone(),
            &String::from("<task_description>\n{{N1735794080847.test}}\n</task_description>"),
        )
        .await
        .unwrap();

    tracing::debug!("[{}]", prompt_str);
}
